<?php if(isset($banner_slide) && $banner_slide->num_rows() > 0): ?>
<!-- ads -->
<div class="container">
  <section class="panel  m-b-none">
    <div class="carousel auto slide panel-body" id="c-fade">
        <ol class="carousel-indicators out">
        <?php $i = 0; ?>
        <?php foreach($banner_slide->result_array() as $row): ?>
          <li data-target="#c-fade" data-slide-to="<?php echo $i; ?>" class="<?php echo $i++ == 0 ? 'active' : '' ?>"></li>
        <?php endforeach; ?>
        </ol>
        <div class="carousel-inner">
        <?php $i = 0; ?>
        <?php foreach($banner_slide->result_array() as $row): ?>
          <div class="item<?php echo $i++ == 0 ? ' active' : '' ?> text-center">
            <a href="<?php echo $row[field('url')]; ?>">
              <img src="<?php echo base_url(UPLOAD_PATH.'banners/'.$row[field('image')]); ?>" width="100%" height="100%" />
            </a>
          </div>
        <?php endforeach; ?>
        </div>
        <a class="left carousel-control" href="#c-fade" data-slide="prev">
          <i class="fa fa-angle-left"></i>
        </a>
        <a class="right carousel-control" href="#c-fade" data-slide="next">
          <i class="fa fa-angle-right"></i>
        </a>
    </div>
  </section>
<?php endif; ?>
<!-- end ads -->
</div>
